package com.imstlife.vending.net;



import java.util.ArrayList;

import io.reactivex.Flowable;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.Url;

/**
 * Created by ADan on 2017/12/18.
 */

public interface RetrofitServer {

    @FormUrlEncoded
    @POST
    Observable<String> getDrinkList(
            @Url String url,
            @Field("deviceId") String deviceId
    );

    @FormUrlEncoded
    @POST
    Observable<String> sync(
            @Url String url,
            @Field("deviceId") String deviceId,
            @Field("outTradeNo") String outTradeNo,
            @Field("state") String state
    );

    @Multipart
    @POST
    Observable<String> upLoadLog(@Url String url, @Part MultipartBody.Part part);

    @Multipart
    @POST
    Observable<String> upLoadLog(@Url String url, @Query("id") String id, @Part MultipartBody.Part part);
}
